package com.kagura.querydrug.service.impl;

import com.kagura.querydrug.dao.DrugYpkcDao;
import com.kagura.querydrug.pojo.DrugYpkc;
import com.kagura.querydrug.service.DrugYpkcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @PACKAGE_NAME: com.kagura.querydrug.service.impl
 * @CLASS_NAME: DrugYpkcServiceImpl
 * @USER: kagura
 * @Description TODO 药品库存查询实现类
 * @Date 2021/6/3 6:21 下午
 * @MONTH_NAME_FULL: 六月
 * @DAY: 03
 * @DAY_NAME_FULL: 星期四
 * @PROJECT_NAME: queryDrug
 **/
@Service
public class DrugYpkcServiceImpl implements DrugYpkcService {

    // 将dao实例注入到spring容器
    @Autowired
    private DrugYpkcDao drugYpkcDao;

    // 根据药品名称获取药品信息
    @Override
    public List<DrugYpkc> findByYPMC(String ypmc) {
        return drugYpkcDao.findByYPMC(ypmc);
    }

    // 根据发药科室获取药品信息
    @Override
    public List<DrugYpkc> findByStorageName(String storageName) {
        return drugYpkcDao.findByStorageName(storageName);
    }
}
